newEntity{
	define_as = "ELEMENTAL",
	type = "elemental", subtype = "elemental",
	display = "E", color=colors.UMBER,
	name = "earth elemental",
	desc = "This brawny being, seemingly made of stone and earth and as tall as a mountain, lumbers toward you.",
	level_range = {1, 50}, exp_worth = 1,
	rarity = 1,
	rank = 1,
	max_life = resolvers.rngavg(12,15),
	stats = { str=11, dex=8, con=12 },
	ai = "dumb_talented_simple", ai_state = { talent_in=3, },
	combat = { dam=2, atk=10, apr=2, damtype=DamageType.EARTH },
	combat_armor = 0, combat_defense = 0,
	resists = { [DamageType.EARTH] = 50, [DamageType.LIGHTNING] = -50, },
	faction = "earth",
}

-- the boss, no rarity means it will not be randomly generated.
newEntity{
	define_as = "ELEMENTAL_BOSS",
	type = "elemental", subtype = "elemental",
	display = "E", color=colors.UMBER,
	name = "Quaker, Master of Earth",
	desc = "A towering earth elemental stands before you. The walls and ceiling are reduced to rubble as Quaker advances.",
	level_range = {20, 50}, exp_worth = 1,
	rank = 5,
	body = { INVEN = 100, BODY = 1, CLOAK = 1, HEAD = 1, BELT = 1, HANDS = 1, FEET = 1 },
	max_life = resolvers.rngavg(120,140),
	stats = { str=20, dex=15, con=25 },
	ai = "dumb_talented_simple", ai_state = { talent_in=3, },
	combat = { dam=8, atk=10, apr=2, damtype=DamageType.EARTH },
	combat_armor = 10, combat_defense = 0,
	resists = { [DamageType.EARTH] = 100, },
	faction = "earth",
	resolvers.equip{
		{type="armor", subtype="robe", defined="ELEMENTAL_ARTIFACT", autoreq=true},
	},
	on_die = function(self, who)
		if game.player.faction == "air" then
--			game.player:resolveSource():
			game.player:setQuestStatus("destroy-earth", engine.Quest.COMPLETED, "earth-guardian")
		end
	end,

	can_talk = "boss-earth", --[[function(self, who)
		if game.player.faction == "earth" then return "boss-earth" end
		return false
	end,]]
}
